package com.rdc.example.service;

import com.rdc.example.bean.Result;
import com.rdc.example.bean.dto.ArticleDTO;

import java.util.List;

/**
 * @author duck
 */
public interface ArticleService {
    List<ArticleDTO> listArticleByUserId(Integer userId);

    Result insertArticle(ArticleDTO article);

    Result updateArticle(ArticleDTO article);

    Result deleteArticle(Integer articleId);

    Result turnTopArticle(Integer articleId);

    Result addColumn(Integer articleId, Integer columnId);

    Result removeColumn(Integer articleId);

    List<ArticleDTO> listArticle() throws Exception;

    List<ArticleDTO> listArticleSortByLikesDesc();

    List<ArticleDTO> listArticleByColumnId(Integer columnId);

    List<ArticleDTO> listArticleByIds(List<Integer> articleIds);

    List<ArticleDTO> searchArticlesByName(String keyword) throws Exception;
}
